import { Component,OnInit } from '@angular/core';
/* wiper插件 */
import 'swiper';

declare let $:any;
declare let Swiper:any;

@Component({
    selector: 'app-banner',
    templateUrl: '../../../views/banner.html',
    styleUrls: ['../../../css/banner.css']
})
export class BannerComponent implements OnInit {
    public isSelect:any = false;
    public home_mobile_show:any;
    constructor() {
        this.isSelect = $.cookie("home");
        switch (this.isSelect) {
            case "1":
                 this.home_mobile_show = true;
        }
    }
    ngOnInit() {
        this.slider();
    }
    public slider(){
        let swiper = new Swiper('#ad-swiper', {
            pagination: '.swiper-pagination',
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            paginationClickable: true,
            centeredSlides: true,
            autoplay: 3000,
            autoplayDisableOnInteraction: false,
            loop: true
        });
    }
}
